package com.jiezhuo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author com.jiezhuo
 * @since 2022-10-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="IotSensorInfo对象", description="")
public class IotSensorInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    @ApiModelProperty(value = "传感器单位")
    private Integer measureUnitType;

    @ApiModelProperty(value = "类型：连续型、开关性等")
    private Integer iotSensorType;

    @ApiModelProperty(value = "种类：温度、IO、开关")
    private Integer iotSensorCategory;

    private Integer nodeId;

    private String sensorDeviceId;

    private Integer portId;

    private Double sdata;

    private String strSdata;

    private Integer seq;

    private Integer deleteFlag;

    @ApiModelProperty(value = "传感器状态")
    private Integer iotSensorStatus;

    private Float requestSdata;

    @ApiModelProperty(value = "精度")
    private Integer sdataDegree;

    @ApiModelProperty(value = "直接公式处理，公式可在数据字典选择")
    private String formulaUp;

    @ApiModelProperty(value = "直接公式处理，公式可在数据字典选择")
    private String formulaDown;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date registerTime;

    @ApiModelProperty(value = "数据类型")
    private Integer dataType;

    @ApiModelProperty(value = "参数功能数值码")
    private Integer paramType;

    @ApiModelProperty(value = "参数名称")
    private String paramNames;

    @ApiModelProperty(value = "参数配置")
    private String paramConfig;

    @ApiModelProperty(value = "参数配置")
    private String infos;

    @ApiModelProperty(value = "储存策略")
    private Integer storeStrage;

    private Integer aid;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date atime;

    private Integer mid;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date mtime;


}
